package com.ashin.util;

import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

public class QQUtils {
    public static final String usagePng = "data/usage.png";
    //提取语音模型参数
    public static String getVoiceModel(String prompt){
        String model = "zhiqi";
        int indexOfStart = prompt.indexOf("#model");
        if(indexOfStart>=0){
            int indexOfEnd = prompt.indexOf("#",indexOfStart+6);
            model = prompt.substring(indexOfStart+6,indexOfEnd).trim();
            if(!audioModel.contains(model))
                model="zhiqi";
        }
        return model;
    }
    private static Set<String> audioModel= new HashSet<>();
    {
        audioModel.addAll(Arrays.asList("zhinan","zhiqi","zhichu","zhide","zhijia","zhiru","zhiqian","zhixiang"));
        audioModel.addAll(Arrays.asList("zhiwei","zhihao","zhijing","zhiming","zhimo","zhina","zhishu","zhistella","zhiting"));
        audioModel.addAll(Arrays.asList("zhixiao","zhiya","zhiye","zhiying","zhiyuan","zhiyue","zhigui","zhishuo"));
        audioModel.addAll(Arrays.asList("beth","betty","cally","cindy","eva","donna","brian"));
    }
}
